package com.lyj.hw_student.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyj.hw_student.system.entity.SysUser;
import com.lyj.hw_student.system.entity.SysUserRole;
import com.lyj.hw_student.system.mapper.SysUserMapper;
import com.lyj.hw_student.system.service.ISysUserRoleService;
import com.lyj.hw_student.system.service.ISysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lyj
 * @since 2025-04-02
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {


    @Override
    public SysUser findByName(String userName) {
        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_name", userName);
        return this.getOne(queryWrapper);
    }
}
